<?php
class Model_UserFactory {

	private static $user_roles = array("admin", "client");

	static function Create($user_role)
	{
		if (!in_array($user_role, self::$user_roles)) 
		{
			// Error out because the user doesn't exist
			throw new Exception("$user_role not found!");
		}
		switch ($user_role) 
		{
			case "admin": return new Model_UserAdmin();
			case "client": return new Model_UserClient();
			default: // Error out because the user kind doesn't exist
		}
	}
}